//
//  UIView+Attributes.m
//  GCDDemo
//
//  Created by 程强 on 16/7/22.
//  Copyright © 2016年 程强. All rights reserved.
//

#import "UIView+Attributes.h"

@implementation UIView (Attributes)
- (CGFloat)x
{
    return self.frame.origin.x;
}
- (CGFloat)y
{
    return self.frame.origin.y;
}
- (CGFloat)width
{
    return self.frame.size.width;
}
- (CGFloat)height
{
    return self.frame.size.height;
}
- (CGSize)size
{
    return self.frame.size;
}
- (CGFloat)centerX
{
    return self.center.x;
}
- (CGFloat)centerY
{
    return self.center.y;
}
@end
